:: chcp 65001
@echo off
@set PATH=D:\Tools\Git\bin;%PATH%
git checkout --orphan latest_branch
git add -A
git commit -am "clear history"
git branch -D main
git branch -m main
::git commit -m "clear"
git push -f origin main
git pull
git push --set-upstream origin main
echo "已清除全部的历史记录!"
echo "查看新仓库信息："
git log --pretty=oneline
git branch -a
git tag
git ls-remote --tags
pause
popd
exit